<?php if(isset($debug_page)): ?>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<?php endif; ?>
	<div class="panel panel-default">
      <div class="panel-body">
        <h3>系统消息</h3>
        <hr/>
        <div> 
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="100" rowspan="2" align="center" valign="top"><?php if($msg_type == 'info'): ?>
          <img src="images/information.gif" width="32" height="32" border="0" alt="information" />
          <?php elseif($msg_type == 'confirm'): ?>
          <img src="images/confirm.gif" width="32" height="32" border="0" alt="confirm" />
          <?php else: ?>
          <img src="images/warning.gif" width="32" height="32" border="0" alt="warning" />
          <?php endif; ?></td>
        <td align="left" style="font-size: 14px; font-weight:bold; color: red;"><p><?php echo $message; ?></p></td>
      </tr>
      <tr>
        <td align="left"> <?php if($auto_redirect): ?> <p style="font-size:13px;">系统将在 <span id="spanSeconds">3</span> 秒后自动跳转到第一个链接地址。</p> <?php endif; ?></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="left" id="links">
          <?php if($links): foreach($links as $url): ?>
          <p><a style="color:#06C" href="<?php echo $url['href'] ?>">>> <?php echo $url['text'] ?></a></p>
          <?php endforeach; endif; ?>
          </td>
      </tr>
    </table>
        </div>
      </div>
      <!--end panel-body --> 
    </div>

<script>
    var i = 3;
    var href = "<?php echo $url['href'];?>";
    var interval = setInterval(function() {
        i--;
        $('#spanSeconds').text(i);
        if(i==0) {
            location.href=href;
            clearInterval(interval);
        }
    }, 1000);
</script>